home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
netz
/
term
/
extras
/
source
/
gtlayout-source.lha
/
LTP_SizeDimensions.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-31
|
1KB
|
82 lines
/* GadTools layout toolkit
**
** Copyright © 1993-1995 by Olaf `Olsen' Barthel
** Freely distributable.
*/
#include "gtlayout_global.h"
ULONG __regargs
LTP_GetSizeWidth(struct LayoutHandle *handle)
{
Object *SizeImage;
ULONG SizeWidth;
UWORD SizeType;
if(handle -> Screen -> Flags & SCREENHIRES)
{
SizeWidth = 18;
SizeType = SYSISIZE_MEDRES;
}
else
{
SizeWidth = 13;
SizeType = SYSISIZE_LOWRES;
}
if(SizeImage = NewObject(NULL,SYSICLASS,
SYSIA_Size, SizeType,
SYSIA_Which, SIZEIMAGE,
SYSIA_DrawInfo, handle -> DrawInfo,
TAG_DONE))
{
GetAttr(IA_Width,SizeImage,&SizeWidth);
DisposeObject(SizeImage);
}
if(SizeWidth < handle -> Screen -> WBorRight)
return(handle -> Screen -> WBorRight);
else
return(SizeWidth);
}
/*****************************************************************************/
ULONG __regargs
LTP_GetSizeHeight(struct LayoutHandle *handle)
{
Object *SizeImage;
ULONG SizeHeight;
UWORD SizeType;
if(handle -> Screen -> Flags & SCREENHIRES)
{
SizeHeight = 10;
SizeType = SYSISIZE_MEDRES;
}
else
{
SizeHeight = 11;
SizeType = SYSISIZE_LOWRES;
}
if(SizeImage = NewObject(NULL,SYSICLASS,
SYSIA_Size, SizeType,
SYSIA_Which, SIZEIMAGE,
SYSIA_DrawInfo, handle -> DrawInfo,
TAG_DONE))
{
GetAttr(IA_Height,SizeImage,&SizeHeight);
DisposeObject(SizeImage);
}
if(SizeHeight < handle -> Screen -> WBorBottom)
return(handle -> Screen -> WBorBottom);
else
return(SizeHeight);
}